import requests


class InterfaceTest01():
    @classmethod
    def get_baidu(self):
        url = 'http://www.baidu.com'
        req = requests.get(url)
        print(req.status_code)  # 状态码
        print(req.cookies['BAIDUID'])
        print(req.headers['Bdpagetype'])  # 请求头
        # print(req.text)  # 正文

if __name__ == '__main__':
    InterfaceTest01.get_baidu()
